/*
 * Copyright (C) Francisco Morero Peyrona. All rights reserved.
 *
 * This software is published under the terms of Open Source
 * License version 1.1, a copy of which has been included with this
 * distribution in the License.txt file.
 */
 
package jdbcmanager.swing;

import java.awt.*;
import javax.swing.*;

/**
 * 
 * @author f.morero
 */

public class JPanelNote extends JPanel
{
   private JLabel    lbl = new JLabel();
   private JTextNote txt = new JTextNote();
   
   //-----------------------------------------------------// 
   
   public JPanelNote()
   {
      this( null );
   }
   
   public JPanelNote( String sNote )
   {
      setBorder( BorderFactory.createEmptyBorder( 24, 9, 20, 9 ) );
      
      this.lbl.setText( "Note:  " );  // NEXT: este panel no esta muy bonito: quitar estos 2 espacios y hacer q la lbl este a la altura del txt
      this.lbl.setFont( lbl.getFont().deriveFont( Font.BOLD ) );
      this.txt.setText( sNote );
      
      // Panel for lbl and txt
      JPanel pnl = new JPanel( new BorderLayout() );
             pnl.add( lbl, BorderLayout.WEST   );
             pnl.add( txt, BorderLayout.CENTER );
          
      // Compounds the panel
      setLayout( new BorderLayout( 9,9 ) );
      add( new JPopupMenu.Separator(), BorderLayout.NORTH );
      add( pnl, BorderLayout.CENTER );
   }
}
